package gui.items;


import gui.fenetrage.GUIFenetrePrincipale;
import gui.panels.FenetreParametrageLagrange;
import gui.panels.FenetreParametrageRecuit;
import gui.panels.FenetreParametrageVNS;
import gui.panels.FenetrePrincipale;
import gui.panels.FenetrePrincipale.Methode;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

public class ActionBoutonMethode implements ActionListener{

	public void actionPerformed(ActionEvent e) {
		Methode methode = FenetrePrincipale.getInstance().getMethodeSelection();
		if (methode == Methode.RECUIT) {
			GUIFenetrePrincipale.getInstance().setPlanche(FenetreParametrageRecuit.getInstance());
		}
		else if (methode == Methode.RELAX) {
			GUIFenetrePrincipale.getInstance().setPlanche(FenetreParametrageLagrange.getInstance());
		}
		else if (methode == Methode.VNS) {
			GUIFenetrePrincipale.getInstance().setPlanche(FenetreParametrageVNS.getInstance());
		}
	}
	
}
